package org.laobai.shop.admin.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.laobai.shop.goods.entity.Brand;
import org.laobai.shop.goods.service.BrandService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.github.pagehelper.PageInfo;

@Controller
@RequestMapping("brand")
public class BrandController {
	@DubboReference
	private BrandService brandService;
	
	@RequestMapping("list")
	public String brand(int currPage, @RequestBody(required=false) Brand brand,Model model){
		
		PageInfo<Brand> page = brandService.page(currPage, brand);
		model.addAttribute("page",page);
		return "/brand/list";
	}
}
